[mirrors]
http://heanet.dl.sourceforge.net/project/tcl/Tcl/8.6.4/tk8.6.4-src.tar.gz

[vars]
filesize=4266426
sha512=d0a1d1fd0938af4a9e532aa1bd4488647cff05f98e9e09b5fa16b773364a5d61030b7975541c688c7e0afc0bde60d49ce50a24d842549bab1622a0255e267909
tardir=tk8.6.4
desc='graphical toolkit to create gui apps with the TCL scripting language'

[deps]
tcl
libx11

[build]
cd unix

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir --with-tcl=$butch_root_dir$butch_prefix/lib"

CFLAGS="-D_GNU_SOURCE $optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/bin
ln -sf wish8.6 "$dest"/bin/wish
